package com.company.BubbleSort;

public class BubbleSort {

    public static void main(String[] args) {

        int[] arrs = {23,123,435,456,233,243,234,123,2343,1};

        sort(arrs);

        for (int arr : arrs) {

            System.out.println(arr);
        }

    }

    public static void sort(int[] arrs)
    {
        for (int count = 1 ; count < arrs.length ; count++)
        {
            for (int a = 0 ; a < arrs.length - count ; a++)
            {
                if (arrs[a] < arrs[a+1])
                {

                    int lingshi = arrs[a];

                    arrs[a] = arrs[a+1];

                    arrs[a+1] = lingshi;

                }
            }
        }

    }

}
